package com.alpha.tables;

import java.io.Serializable;
import javax.persistence.*;

/**
 * The primary key class for the activity database table.
 * 
 */
@Embeddable
public class ActivityPK implements Serializable {
	//default serial version id, required for serializable classes.
	private static final long serialVersionUID = 1L;

	private int idactivity;

	@Column(name="employee_idemployee")
	private int employeeIdemployee;
	
	@Column(name="project_idproject")
	private int projectIdproject;

    public ActivityPK() {
    }
	public int getIdactivity() {
		return this.idactivity;
	}
	public void setIdactivity(int idactivity) {
		this.idactivity = idactivity;
	}
	public int getEmployeeIdemployee() {
		return this.employeeIdemployee;
	}
	public void setEmployeeIdemployee(int employeeIdemployee) {
		this.employeeIdemployee = employeeIdemployee;
	}
	public int getProjectIdproject() {
		return this.projectIdproject;
	}
	public void setProjectIdproject(int projectIdproject) {
		this.projectIdproject = projectIdproject;
	}

	public boolean equals(Object other) {
		if (this == other) {
			return true;
		}
		if (!(other instanceof ActivityPK)) {
			return false;
		}
		ActivityPK castOther = (ActivityPK)other;
		return 
			(this.idactivity == castOther.idactivity)
			&& (this.employeeIdemployee == castOther.employeeIdemployee)
			&& (this.projectIdproject == castOther.projectIdproject);

    }
    
	public int hashCode() {
		final int prime = 31;
		int hash = 17;
		hash = hash * prime + this.idactivity;
		hash = hash * prime + this.employeeIdemployee;
		hash = hash * prime + this.projectIdproject;
		
		return hash;
    }
}